<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<!--suppress HtmlRequiredTitleElement -->
<head>
    <th:block th:include="include :: header('操作日志记录')"/>
</head>
<body class="layui-layout-body theme-himio">
<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <!-- 表格工具栏 -->
            <form class="layui-form toolbar">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">模块标题:</label>
                        <div class="layui-input-inline">
                            <input name="title" class="layui-input" placeholder="请输入模块标题"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">业务类别:</label>
                        <div class="layui-input-inline">
                            <label>
                                <select name="businessType" th:with="type=${@dict.getType('sys_operate_type')}">
                                    <option value="">全部</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}"></option>
                                </select>
                            </label>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">操作人员:</label>
                        <div class="layui-input-inline">
                            <input name="operateName" class="layui-input" placeholder="请输入操作人员"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">部门名称:</label>
                        <div class="layui-input-inline">
                            <input name="deptName" class="layui-input" placeholder="请输入部门名称"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">操作状态:</label>
                        <div class="layui-input-inline">
                            <label>
                                <select name="status" th:with="type=${@dict.getType('sys_common_status')}">
                                    <option value="">全部</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}"></option>
                                </select>
                            </label>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">操作时间:</label>
                        <div class="layui-input-inline">
                            <input name="operateTime" lay-date lay-date-range class="layui-input icon-date"
                                   placeholder="选择日期范围" autocomplete="off" style="width: 210px;"/>
                        </div>
                    </div>
                    <div class="layui-inline">&emsp;
                        <button class="layui-btn icon-btn" lay-filter="operateLogTbSearch" lay-submit>
                            <i class="layui-icon layui-icon-search"></i>搜索
                        </button>
                    </div>
                </div>
            </form>
            <!-- 数据表格 -->
            <table id="operateLogTable" lay-filter="operateLogTable"></table>
        </div>
    </div>
</div>

<!--表格操作工具按钮-->
<script type="text/html" id="operateLogTbBar">
    <a class="layui-btn layui-bg-cyan    layui-btn-sm icon-btn" lay-event="detail"
       shiro:hasPermission="system:operateLog:view"><i class="fa fa-search-plus"></i>详细</a>
    <a class="layui-btn layui-btn-danger layui-btn-sm icon-btn" lay-event="del"
       shiro:hasPermission="system:operateLog:remove"><i class="fa fa-trash"></i>删除</a>
</script>


<!-- 表单弹窗 edit -->
<script type="text/html" id="operateLogEditDialog">
    <form id="operateLogEditForm" lay-filter="operateLogEditForm" class="layui-form model-form">
        <div class="layui-row">
            <div class="layui-col-md6">
                <div class="layui-form-item">
                    <label class="layui-form-label">模块标题:</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" class="layui-input" disabled/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">请求方式:</label>
                    <div class="layui-input-block">
                        <input type="text" name="requestMethod" class="layui-input" disabled/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">部门名称:</label>
                    <div class="layui-input-block">
                        <input type="text" name="deptName" class="layui-input" disabled/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">主机地址:</label>
                    <div class="layui-input-block">
                        <input type="text" name="operateIp" class="layui-input" disabled/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">请求参数:</label>
                    <div class="layui-input-block">
                        <label>
                            <textarea name="operateParam" class="layui-textarea" disabled></textarea>
                        </label>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">操作状态:</label>
                    <div class="layui-input-block">
                        <label>
                            <select name="status" th:with="type=${@dict.getType('sys_common_status')}"
                                    disabled>
                                <option value="">全部</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}" th:selected="${dict.default}"></option>
                            </select>
                        </label>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">操作时间:</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" name="operateTime" disabled readonly="readonly" lay-date/>
                    </div>
                </div>
            </div>
            <div class="layui-col-md6">
                <div class="layui-form-item">
                    <label class="layui-form-label">方法名称:</label>
                    <div class="layui-input-block">
                        <input type="text" name="method" class="layui-input" disabled/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">操作人员:</label>
                    <div class="layui-input-block">
                        <input type="text" name="operateName" class="layui-input" disabled/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">请求URL:</label>
                    <div class="layui-input-block">
                        <input type="text" name="operateUrl" class="layui-input" disabled/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">操作地点:</label>
                    <div class="layui-input-block">
                        <input type="text" name="operateLocation" class="layui-input" disabled/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">返回参数:</label>
                    <div class="layui-input-block">
                        <label>
                            <textarea name="jsonResult" class="layui-textarea" disabled></textarea>
                        </label>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">错误消息:</label>
                    <div class="layui-input-block">
                        <label>
                            <textarea name="errorMsg" class="layui-textarea" disabled></textarea>
                        </label>
                    </div>
                </div>
            </div>

        </div>

        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">关闭</button>
        </div>
    </form>
</script>


<!-- js部分 -->
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var addFlag = [[${@permission.hasPermit('system:operateLog:add')}]];
    var editFlag = [[${@permission.hasPermit('system:operateLog:edit')}]];
    var removeFlag = [[${@permission.hasPermit('system:operateLog:remove')}]];
    var exportFlag = [[${@permission.hasPermit('system:operateLog:export')}]];
    var dictSysOperateType = [[${@dict.getType('sys_operate_type')}]];
    var dictSysCommonStatus = [[${@dict.getType('sys_common_status')}]];
    var prefix = ctx + "monitor/operateLog";
</script>
<script th:src="@{/static/assets/system/js/operateLog.js}"></script>
</body>
</html>

